<template>
	<view class="hosp-item" @click="goHospDetail(item)">
		<view class="" style="display: flex; align-items: center;">
			<view class="img-box">
				<u--image :src="item.image" width="97rpx" height="97rpx" radius="18rpx 0 0 18rpx">
				</u--image>
			</view>
			<view class="r-content">
				<view class="name ellipses-one">{{item.name}}</view>
				<view class="labels ellipses-one">
					<text class="label">￥{{item.price}}</text><text class="label">已售232件</text>
				</view>
			</view>
			<view class="anniu" @click="goDetail(item.id)">
				<text class="bookings"> 立即预约</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				type: [Object, String],
				default: {}
			}
		},
		data() {
			return {}
		},
		created() {

		},
		methods: {
			goHospDetail(item) {
				console.log(item)
				
			},
			goDetail(item){
				uni.navigateTo({
					url:'/pages/business/chaperonage?id=' + item
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.hosp-item {
		border-radius: 12rpx;
		background: #fff;
		padding: 30rpx;
		margin-bottom: 30rpx;
		display: flex;
		flex-direction: column;

		.img-box {
			width: 97rpx;
		}

		.r-content {
			flex: 1;
			min-width: 0;
			padding-left: 30rpx;

			.name {
				margin-bottom: 20rpx;
				font-size: 32rpx;
				font-family: PingFangSC-Semibold, PingFang SC;
				font-weight: 600;
				color: #333333;
				letter-spacing: 2px;
			}

			.labels {
				font-size: 26rpx;
				margin-bottom: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #6F7DA2;
				letter-spacing: 1px;


				.label {
					margin-right: 40rpx;

					&:last-child {
						margin-right: 0;
					}

				}
			}


		}

		.anniu {
			.bookings {
				font-size: 25rpx;
				background-color: #386FFF;
				color: #fff;
				padding: 15rpx 10rpx;
				border-radius: 10rpx;
			}
		}
	}

	.info {
		padding: 15rpx;
		background: #F8F9FD;
		border-radius: 15rpx;
		font-size: 24rpx;
		font-family: PingFangSC-Light, PingFang SC;
		font-weight: 300;
		color: #6F7DA2;
		letter-spacing: 1px;
	}
</style>